package com.kanshu.ksgb.fastread.doudou.module.makemoney.activity;

import android.content.Context;
import android.content.Intent;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.kanshu.ksgb.fastread.doudou.R;
import com.kanshu.ksgb.fastread.doudou.base.baseui.BaseActivity;
import com.kanshu.ksgb.fastread.doudou.common.util.Utils;

import java.io.File;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by wcy on 18/5/31.
 */

public class Face2FaceActivity extends BaseActivity {

    @BindView(R.id.ercode)
    ImageView mErcode;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_face2face_layout);
        ButterKnife.bind(this);
        setTitle("面对面邀请");
        File file = Utils.getDiskCacheDir(getActivity(), "ercode");
        File fileTmp = new File(file, "ercode");
        if (fileTmp != null && fileTmp.exists()) {
            mErcode.setImageBitmap(BitmapFactory.decodeFile(fileTmp.getPath()));
        }
    }

    public static void actionStart(Context context) {
        Intent intent = new Intent(context, Face2FaceActivity.class);
        context.startActivity(intent);
    }
}
